using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class so_allGuarBal__Map : EntityTypeConfiguration<so_allGuarBal__>
    {
        public so_allGuarBal__Map()
        {
            // Primary Key
            this.HasKey(t => t.account__);

            // Properties
            this.Property(t => t.Guarantor__)
                .HasMaxLength(6);

            this.Property(t => t.Guarantor)
                .HasMaxLength(110);

            this.Property(t => t.account__)
                .IsRequired()
                .HasMaxLength(40);

            // Table & Column Mappings
            this.ToTable("so_allGuarBal__");
            this.Property(t => t.Guarantor__).HasColumnName("Guarantor_#");
            this.Property(t => t.Guarantor).HasColumnName("Guarantor");
            this.Property(t => t.account__).HasColumnName("account_#");
            this.Property(t => t.Base_1).HasColumnName("Base_1");
            this.Property(t => t.Base_2).HasColumnName("Base_2");
        }
    }
}
